home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Programmer Power Tools
/
Programmer Power Tools.iso
/
c
/
jazlib.arc
/
JZCNTSTR.C
< prev
next >
Wrap
Text File
|
1986-05-05
|
610b
|
25 lines
/*
┌────────────────────────────────────────────────────────────────────────────┐
│jzcntstr │
│Return a string padded with blanks on the left so as to center it in a │
│given field width. │
│ │
│ (C) JazSoft Software by Jack A. Zucker (301) 794-5950 │
└────────────────────────────────────────────────────────────────────────────┘
*/
char *jzcntstr(fstr,fwidth)
char *fstr;
int fwidth;
{
static char wstr[256]; /* static work buffer */
strcpy(wstr,jzpad((fwidth-strlen(fstr)) >> 1,' '));
strcat(wstr,fstr);
return(wstr);
}